





<div style="width:670px; float:left; padding-left:5px; margin-left:5px" class="border_radius">

<?php

	include_once("../../coms/xl_thongtin.php");

	$bn = new xl_thongtin();

	$arr_bn = $bn->Load_TuVanOnline();

	

	if(isset($_REQUEST['act']) && isset($_REQUEST['id'])):

		$act = $_REQUEST['act'];

		$id = $_REQUEST['id'];

		$maloaitrang = $_REQUEST['malt'];

		if($act == 'del' && is_numeric($id) && is_numeric($maloaitrang)):

			$xoa = new xl_thongtin();

			$kq2 = $xoa->Xoa_Thong_Tin_Theo_Loai_Trang_va_ID($maloaitrang, $id);			

			echo '<script type="text/javascript">

						alert("Xóa nick yahoo thành công!!!");	

						window.location="trangchu.php?key=qltvo";				

					</script>';

		else:

			echo '<script type="text/javascript">

						window.location="trangchu.php?key=qltvo";				

					</script>';

		endif;

	endif;		

?>
  
<div class="content_right_title_admin">
Quản lý tư vấn online
</div>      
<div class="content_right_group_admin box_shadow" style="padding-bottom:5px">
<table width="100%" cellspacing="0" style="padding-left:5px; padding-right:5px" id="myTable">

	<tr bgcolor="#999">

    	<th align="center" valign="middle">

        	STT

        </th>

        <th align="center" valign="middle">

        	Tên tư vấn

        </th>

        <th align="center" valign="middle">

        	Nick yahoo

        </th>

        <th align="center" valign="middle">

        	Chức năng

        </th>

    </tr>

<?php

for ($i=0; $i<count($arr_bn); $i++):

	$row = $arr_bn[$i];

?>

    <tr style="border-bottom:#666;">

    	<td align="center" valign="middle">

        	<?php echo $i+1; ?>

        </td>

        <td align="center" valign="middle">

        	<?php 

				echo $row['tenthongtin'];

			?>

            

        </td>

    	<td align="center" valign="middle">

        	<?php 

				echo $row['noidung'];

			?>

            

        </td>

        <td align="center" valign="middle">

        	<a href="trangchu.php?key=qltvo&act=del&malt=12&id=<?php echo $row['mathongtin']; ?>" class="button medium blue" onclick="javascript: return confirm('Bạn chắc muốn xóa nick yahoo này không?');">Xóa</a>

        </td>

    </tr>

<?php

endfor;

?>

</table><br>



<form method="post" name="fr_themhinhanh" action="trangchu.php?key=qltvo" enctype="multipart/form-data" >

    <table width="60%" align="center"  cellpadding="0" cellspacing="0" class="border_radius" style="font-size:12px">

        <tr>

            <td colspan="2" align="center" height="40px"><span style="font-size:18px; font-weight:bold; color:#f9d765; ">Thêm địa chỉ mới</span></td>

        </tr>

        <tr>

            <td width="30%" style="padding-left:5px;" height="30px" align="left">Tên tư vấn<span style="color:#F00">(*)</span></td>

            <td align="left"><input type="text" name="txt_tenthongtin" size="30" style="height:20px;" class="border_radius"></td>

        </tr>

         <tr>

         	<td width="30%" style="padding-left:5px;" height="30px" align="left">Nick yahoo<span style="color:#F00">(*)</span></td>

            <td colspan="2" align="left" style="vertical-align:middle;">

               <input type="text" name="txt_nick" size="30" style="height:20px;" class="border_radius">

            </td>

        </tr>

        <tr>

            <td colspan="2" align="center" style="vertical-align:middle;">

                <input type="submit" name="btn_upload" value="Thêm mới" class="button small blue" style="margin-top:10px;"/>

            </td>

        </tr>

    </table>

</form><br>



</div>

</div>



<?php

 

if(isset($_POST['btn_upload']))

{

	$tennick = $_POST['txt_tenthongtin'];

	$noidung = $_POST['txt_nick'];

	$upload = new xl_thongtin();

	$ketqua = $upload->ThemNickYahoo($tennick, $noidung);

	echo '<meta http-equiv="refresh" content="0;url=trangchu.php?key=qltvo" />';

	

}



?>